3.1.64 \(\int \frac {(a+b x^2) (A+B x+C x^2+D x^3)}{x^3} \, dx\)

Optimal. Leaf size=54 \[ \log (x) (a C+A b)-\frac {a A}{2 x^2}+x (a D+b B)-\frac {a B}{x}+\frac {1}{2} b C x^2+\frac {1}{3} b D x^3 \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.038, Rules used = {1802} \begin {gather*} \log (x) (a C+A b)-\frac {a A}{2 x^2}+x (a D+b B)-\frac {a B}{x}+\frac {1}{2} b C x^2+\frac {1}{3} b D x^3 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x^2)*(A + B*x + C*x^2 + D*x^3))/x^3,x]

[Out]

-(a*A)/(2*x^2) - (a*B)/x + (b*B + a*D)*x + (b*C*x^2)/2 + (b*D*x^3)/3 + (A*b + a*C)*Log[x]

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right ) \left (A+B x+C x^2+D x^3\right )}{x^3} \, dx &=\int \left (b B \left (1+\frac {a D}{b B}\right )+\frac {a A}{x^3}+\frac {a B}{x^2}+\frac {A b+a C}{x}+b C x+b D x^2\right ) \, dx\\ &=-\frac {a A}{2 x^2}-\frac {a B}{x}+(b B+a D) x+\frac {1}{2} b C x^2+\frac {1}{3} b D x^3+(A b+a C) \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 51, normalized size = 0.94 \begin {gather*} \log (x) (a C+A b)-\frac {a \left (A+2 B x-2 D x^3\right )}{2 x^2}+\frac {1}{6} b x \left (6 B+3 C x+2 D x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x^2)*(A + B*x + C*x^2 + D*x^3))/x^3,x]

[Out]

(b*x*(6*B + 3*C*x + 2*D*x^2))/6 - (a*(A + 2*B*x - 2*D*x^3))/(2*x^2) + (A*b + a*C)*Log[x]

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a+b x^2\right ) \left (A+B x+C x^2+D x^3\right )}{x^3} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((a + b*x^2)*(A + B*x + C*x^2 + D*x^3))/x^3,x]

[Out]

IntegrateAlgebraic[((a + b*x^2)*(A + B*x + C*x^2 + D*x^3))/x^3, x]

________________________________________________________________________________________

fricas [A]  time = 0.62, size = 55, normalized size = 1.02 \begin {gather*} \frac {2 \, D b x^{5} + 3 \, C b x^{4} + 6 \, {\left (D a + B b\right )} x^{3} + 6 \, {\left (C a + A b\right )} x^{2} \log \relax (x) - 6 \, B a x - 3 \, A a}{6 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(D*x^3+C*x^2+B*x+A)/x^3,x, algorithm="fricas")

[Out]

1/6*(2*D*b*x^5 + 3*C*b*x^4 + 6*(D*a + B*b)*x^3 + 6*(C*a + A*b)*x^2*log(x) - 6*B*a*x - 3*A*a)/x^2

________________________________________________________________________________________

giac [A]  time = 0.38, size = 48, normalized size = 0.89 \begin {gather*} \frac {1}{3} \, D b x^{3} + \frac {1}{2} \, C b x^{2} + D a x + B b x + {\left (C a + A b\right )} \log \left ({\left | x \right |}\right ) - \frac {2 \, B a x + A a}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(D*x^3+C*x^2+B*x+A)/x^3,x, algorithm="giac")

[Out]

1/3*D*b*x^3 + 1/2*C*b*x^2 + D*a*x + B*b*x + (C*a + A*b)*log(abs(x)) - 1/2*(2*B*a*x + A*a)/x^2

________________________________________________________________________________________

maple [A]  time = 0.01, size = 48, normalized size = 0.89 \begin {gather*} \frac {D b \,x^{3}}{3}+\frac {C b \,x^{2}}{2}+A b \ln \relax (x )+B b x +C a \ln \relax (x )+D a x -\frac {B a}{x}-\frac {A a}{2 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)*(D*x^3+C*x^2+B*x+A)/x^3,x)

[Out]

1/3*b*D*x^3+1/2*b*C*x^2+B*b*x+a*D*x-1/2*a*A/x^2-a*B/x+A*ln(x)*b+C*ln(x)*a

________________________________________________________________________________________

maxima [A]  time = 1.32, size = 48, normalized size = 0.89 \begin {gather*} \frac {1}{3} \, D b x^{3} + \frac {1}{2} \, C b x^{2} + {\left (D a + B b\right )} x + {\left (C a + A b\right )} \log \relax (x) - \frac {2 \, B a x + A a}{2 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)*(D*x^3+C*x^2+B*x+A)/x^3,x, algorithm="maxima")

[Out]

1/3*D*b*x^3 + 1/2*C*b*x^2 + (D*a + B*b)*x + (C*a + A*b)*log(x) - 1/2*(2*B*a*x + A*a)/x^2

________________________________________________________________________________________

mupad [B]  time = 1.14, size = 47, normalized size = 0.87 \begin {gather*} \frac {b\,x^3\,D}{3}+B\,b\,x-\frac {A\,a}{2\,x^2}-\frac {B\,a}{x}+\frac {C\,b\,x^2}{2}+A\,b\,\ln \relax (x)+C\,a\,\ln \relax (x)+a\,x\,D \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)*(A + B*x + C*x^2 + x^3*D))/x^3,x)

[Out]

(b*x^3*D)/3 + B*b*x - (A*a)/(2*x^2) - (B*a)/x + (C*b*x^2)/2 + A*b*log(x) + C*a*log(x) + a*x*D

________________________________________________________________________________________

sympy [A]  time = 0.51, size = 51, normalized size = 0.94 \begin {gather*} \frac {C b x^{2}}{2} + \frac {D b x^{3}}{3} + x \left (B b + D a\right ) + \left (A b + C a\right ) \log {\relax (x )} + \frac {- A a - 2 B a x}{2 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)*(D*x**3+C*x**2+B*x+A)/x**3,x)

[Out]

C*b*x**2/2 + D*b*x**3/3 + x*(B*b + D*a) + (A*b + C*a)*log(x) + (-A*a - 2*B*a*x)/(2*x**2)

________________________________________________________________________________________